{extend name="base/main" /}
{block name="body"}
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
    <ul class="layui-tab-title">
        <li class="layui-this">批次列表</li>
        <li><a href="type_index.html"></a>会员卡列表</li>
    </ul>
    <form class="form-horizontal m-t" action="{:url('carmichael/index')}" method="get">
        <div class="form-group">
            <label class="col-sm-2 control-label">批次名称：</label>
            <div class="col-sm-3">
                <input name="title" type="text" class="form-control" placeholder="请输入批次名称" value="{:input('title')}" />
            </div>
            <button class="btn btn-primary btn-sm" type="submit">搜索</button>
        </div>
    </form>
    <div class="layui-tab-content" style="height: 100px;">
        <div class="layui-tab-item">
            <a type="button"  class="layui-btn layui-btn-normal" href="create.html">新增批次</a>
            <a type="button" class="layui-btn layui-btn-normal">刷新</a>
            <div class="layui-form">
                <table class="layui-table">
                    <colgroup>
                        <col width="150">
                        <col width="150">
                        <col width="200">
                        <col>
                    </colgroup>
                    <thead>
                    <tr>
                        <th>编号</th>
                        <th>批次名称</th>
                        <th>体验天数</th>
                        <th>发卡总数量</th>
                        <th>使用数量</th>
                        <th>制卡时间</th>
                        <th>是否激活</th>
                        <th>二维码</th>
                        <th>备注</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {volist name="list" id="vo"}
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.name}</td>
                        <td>{$vo.tian}</td>
                        <td>{$vo.count}</td>
                        <td>{$vo.meber}</td>
                        <td>{:date('Y-m-d H:i:s',$vo['time'])}</td>

                        <td>
                            <?php if($vo['status'] == 1){ ?>
                            <i class="fa fa-check text-navy"></i>
                            <?php }else{ ?>
                            <i class="fa fa-check fa-close"></i>
                            <?php } ?>
                        </td>
                        <td><img src="{$vo.img}" width="100%"></td>
                        <td>{$vo.remarks}</td>
                        <td>
                            <button type="button" class="layui-btn">导出</button>
                            <div class="dropdown" style="display: inline-block;">
                                <button data-toggle="dropdown" class="btn btn-success btn-xs dropdown-toggle layui-btn">
                                    <i class="fa fa-chevron-down "></i> 更多
                                </button>
                                <ul class="dropdown-menu m-t-xs">
                                    <li><a href="{:url('carmichael/type_index')}"><i class="fa fa-bars"></i>&nbsp;&nbsp;查看卡列表</a></li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
            </div>
        </div>
        <div class="layui-tab-item">
            <a type="button" class="layui-btn layui-btn-normal">刷新</a>
            <div class="layui-form">
                <table class="layui-table">
                    <colgroup>
                        <col width="150">
                        <col width="150">
                        <col width="200">
                        <col>
                    </colgroup>
                    <thead>
                    <tr>
                        <th>编号</th>
                        <th>卡号</th>
                        <th>密码</th>
                        <th>领取人</th>
                        <th>领取人电话</th>
                        <th>领取时间</th>
                        <th>是否激活</th>
                    </tr>
                    </thead>
                    <tbody>
                    {volist name="info" id="vo"}
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.card}</td>
                        <td>{$vo.pass}</td>
                        <td>{$vo.reci}</td>
                        <td>{$vo.reci_tel}</td>
                        <td>{:date('Y-m-d H:i:s',$vo['time'])}</td>
                        <td>
                            <?php if($vo['status'] == 1){ ?>
                            <i class="fa fa-check text-navy"></i>
                            <?php }else{ ?>
                            <i class="fa fa-check fa-close"></i>
                            <?php } ?>
                        </td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<script>
    layui.use('element', function(){
        var $ = layui.jquery
            ,element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块
    });

</script>
{/block}